package org.example.laboratorymanagement.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.laboratorymanagement.pojo.Device;

import java.util.List;

@Mapper
public interface DeviceMapper {

    List<Device> listDevices(@Param("name") String name, @Param("local") String local);

    @Insert("insert into device(name, local, state, create_time, update_time) " +
            "values(#{name},#{local},default,#{createTime},#{updateTime})")
    void insert(Device device);

    void update(Device device);

    void delete(List<Integer> ids);

    void insertBatch(Device device);
}
